package com.luo.cloud.controller;

import com.luo.cloud.remote.HelloRemote;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * @author xiangnan
 * @date 2018/3/29 10:53
 */
@RestController
@RequestMapping("/hello")
public class HelloController {

    @Resource
    private HelloRemote helloRemote;

    @RequestMapping("/{msg}")
    public String hello(@PathVariable String msg) {
        System.out.println("hello " + msg);
        return helloRemote.hello(msg);
    }

}
